Skip to content

feat: lifecycle commands, output formatting, and show-commands mode#54

Merged
robbycochran merged 3 commits into
mainfrom
feat/lifecycle-primitives
Jun 9, 2026
Merged

feat: lifecycle commands, output formatting, and show-commands mode#54
robbycochran merged 3 commits into
mainfrom
feat/lifecycle-primitives

Conversation

@robbycochran

Copy link
Copy Markdown
Collaborator

Summary

  • Add harness status / logs / stop / start commands wrapping openshell sandbox lifecycle operations (NemoClaw gap analysis item feat: update for latest OpenShell with Helm chart and provider system #1 from deep research)
  • Add Header() and Table() to the status module for structured, column-aligned output
  • Add --show-commands flag that prints openshell CLI commands to stdout as a teaching aid, decoupled from execution via ShowEquivalentCmd() so it survives the future gRPC migration

Details

Lifecycle commands: Four new Gateway interface methods (SandboxStatus, SandboxLogs, SandboxStop, SandboxStart) with CLI implementations. stop and start auto-select when exactly one sandbox is running. logs supports --follow/-f.

Output formatting: status.Header(title) prints a title with underline. status.Table(headers, rows) computes column widths and prints aligned output.

Show commands: status.ShowCommands is independent from status.Verbose. When --show-commands is set, every openshell CLI invocation prints to stdout. For the future gRPC gateway, ShowEquivalentCmd() can display the equivalent CLI command even when executing via gRPC.

Test plan

  • go build ./... compiles
  • go vet ./... clean
  • go test ./internal/status/ passes (Header, Table, ShowCommands tests)
  • go test ./internal/gateway/ passes (SandboxStatus, Stop, Start, Logs tests)
  • New cmd tests for status, stop, start, resolveSandboxName
  • Manual: harness status with/without active gateway
  • Manual: harness --show-commands create shows commands on stdout

Add harness status/logs/stop/start commands wrapping openshell sandbox
lifecycle operations. Add Header() and Table() to status module for
structured output. Add --show-commands flag that prints openshell CLI
commands to stdout as a teaching aid, decoupled from execution so it
survives the future gRPC migration.
Quiet noisy kubectl/helm passthrough output in deploy (CRD install, SCC
grants, rollout status now captured instead of streamed). Switch phase
headers from === Section === to Header() with underline. Fix
registerProviders printing "Done. Launch a sandbox with: harness up
--local" when called from up --remote by adding a standalone parameter.
Add top-level context lines (agent name, image) at the start of up flows.
Remove inconsistent spacing and stray fmt.Println() calls.
@robbycochran robbycochran force-pushed the feat/lifecycle-primitives branch from 969bba9 to df5fbbd Compare June 9, 2026 02:38
@robbycochran robbycochran merged commit 6be2561 into main Jun 9, 2026
6 checks passed
@robbycochran robbycochran deleted the feat/lifecycle-primitives branch June 13, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant